/**
 * 可写流
 * 先写入缓存区 默认16kb 满了之后再写入文件里
 * 返回false也不会丢失数据 掉地上 从地上捡起来，，，
 */
let fs = require("fs");
let ws = fs.createWriteStream("./2.txt", {
  flags: "w",
  mode: 0o666,
  start: 0,
  highWaterMark: 3,
});
let flag = ws.write("wo");
console.log("fff", flag);
flag = ws.write("sh");
console.log("fff", flag);
flag = ws.write("in");
console.log("fff", flag);
